<?php
	include ('../codebase/connector/scheduler_connector.php');
	include ('../common/config.php');
	
	$res=mysql_connect($server, $user, $pass);
	mysql_set_charset('utf8',$res);
	mysql_select_db($db_name);
	
	$popis_vozaca = new OptionsConnector($res);
	//$popis_vozaca->render_table("vozaci","vozac_id","vozac_id(value),prezime(label)");
	$popis_vozaca->render_sql("select vozaci.vozac_id as value, concat(vozaci.ime, ' ', vozaci.prezime) as label from vozaci","vozac_id","vozac_id(value),prezime(label)"); 
	
	$popis_vozila = new OptionsConnector($res);
	$popis_vozila->render_table("vozila","vozilo_id","vozilo_id(value),opis(label)");	
	
	$scheduler = new schedulerConnector($res);
	$scheduler->set_options("popis_vozaca", $popis_vozaca);
	$scheduler->set_options("popis_vozila", $popis_vozila);
	
	$scheduler->enable_log("log.txt",true);
	$scheduler->render_table("transferi","transfer_id","vrijeme_pocetak,vrijeme_kraj,svrha,event_location,lat,lng,vozilo_id,vozac_id");
?>